/**
 * Created by 白雨浓 on 2019/6/28 17:38.
 */
import Vue from "vue";
import { BizError } from "../utils/js/Error";

Vue.config.errorHandler = (err, self, info) => {

  if (!err || err === 'cancel') {
    return;
  }

  if (err instanceof BizError) {
    self.$message.error(err.message);
    return;
  }

  self.$message.error('发生错误');
  console.error(err);
  console.error(info);
};
